﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Linq.Expressions;

namespace System.Web.Mvc
{
    /// <summary>
    /// 经过扩展的控制器基类
    /// </summary>
    public abstract class ExtendedController : Controller
    {
        protected RedirectToRouteResult RedirectToAction<TController>(Expression<Action<TController>> action)
            where TController : Controller
        {
            return RedirectToRoute(ExpressionHelper2.GetRouteValues(action));
        }
    }
}